Configure a Client or Standalone App to Use OAuth Authentication

For Standalone Apps the choice of which type of authentication to use is made by the developer in App Studio when requesting a build of the Standalone App. The authentication method cannot be changed by the user within the Standalone App.

For the Android and Windows Desktop versions of the standard Digitise Apps Client supplied in the Digitise Apps Product Download, OAuth options are available within the Digitise Apps Client's Settings to allow the user to select to use OAuth authentication if required. Users can change between using OAuth and the other supported methods of authentication.

For pre-configured Clients OAuth options may also be available under Settings within the Client, depending upon the settings configured by the developer when requesting the build in App Studio.

OAuth authentication isn't supported in the Universal Client or Universal Standalone Apps.

 

Relevant options available on the Digitise Apps Client's Settings page are:

Use OAuth Authentication

If selected the Digitise Apps Client/Standalone App will use OAuth authentication when logging in.

If not selected, the Digitise Apps Client/Standalone App will use the standard Digitise Apps authentication method or Windows authentication to log in users.

 

OAuth Client ID

If using OAuth authentication, this option allows you to specify the OAuth Client ID which is used together with the OAuth Client Secret, below, to identify Digitise Apps to Google.

The Client ID is generated by Google when you set up OAuth authentication for Digitise Apps in the Google API Console.

On Apple devices, in order to view this setting, you need to tap the > icon to the right of the OAuth Authentication option.

 

OAuth Client Secret

If using OAuth authentication, this option allows you to specify the OAuth Client Secret which is used together with the OAuth Client ID, above, to identify Digitise Apps to Google.

The Client Secret is generated by Google when you set up OAuth authentication for Digitise Apps in the Google API Console.

On Apple devices, in order to view this setting, you need to tap the > icon to the right of the OAuth Authentication option.

 

Save Password

When using OAuth authentication, this option determines whether a user can be automatically logged in after logging out or closing down the Digitise Apps Client or Standalone App.

If Save Password is selected, when logging back in or reloading the Digitise Apps Client or a Digitise app, Digitise Apps will automatically log the user in, using the last logged-in user's credentials and without displaying any of the Google login pages, providing their access token is still valid. In addition, if a user attempts to log in whilst the network signal is down, Digitise Apps will log them in, providing the access token has been created or refreshed within the last hour.

If Save Password is not selected, the user will always be prompted when logging in.

  • When using OAuth authentication, the Settings Always login anonymously option will be disabled as it is not relevant when using OAuth.

 

If you are building a pre-configured Digitise Apps Client or a Standalone App, the Build request dialog includes corresponding options to allow you to specify the use of OAuth authentication and to provide the required configuration details. The relevant options can be found on the Security tab within the Build request dialog.

Under the Security tab you need to set the Authentication Mode option to Google Authentication.

You then need to enter the Client ID and Client Secret which identify the Google Client to be used to validate users when they login. These will be supplied by whoever configured your use of OAuth within Google or, if that was you, can be obtained from the Google API Console if you do not have them to hand.

Set the Save Password option as required.

Finally, there is one more option that you need to consider:

Hide OAuth Settings

This option is only available in the Build request dialog for a pre-configured Client or Standalone App; it doesn't appear on a Client or app's Settings page.

It determines whether the OAuth Client ID and Secret values should be visible to users in the Settings when using a pre-configured Digitise Apps Client and whether the user can change between using OAuth or another method of authentication.

In Standalone Apps the Client ID and Secret are never visible to users, whatever the method of Authentication selected and the value of the Hide OAuth Settings option is generally ignored. Note, however, that if you want to overwrite an existing version of a Standalone App with a new version of the app and you want to change from another method of authentication to using OAuth authentication or change the Client ID and Secret, you must select Hide OAuth Settings, otherwise the authentication method settings won't change when you install the new Standalone App build. Alternatively, you can uninstall the original version before you install the new version, in which case you don't need to select Hide OAuth Settings.

In a pre-configured Client, if the Authentication Mode option is set to Standard Authentication, users can see the Use OAuth option in the Client's Settings but not the Client ID or Secret. In this situation, however, the Use OAuth option is always not selected and disabled. This is true whether the user is logged in or not.

If the Authentication Mode option is set to Google Authentication, however, the Hide OAuth Settings option determines whether the OAuth options are visible and enabled within the Digitise Apps Client's Settings.

If Hide OAuth Settings is selected, within the Digitise Apps Client's Settings the Use OAuth option is visible and selected but disabled and the Client ID and Client Secret are not visible. This is true whether a user is logged in or not.

If Hide OAuth Settings is not selected, within the Digitise Apps Client's Settings all OAuth options are available and visible when the user is not logged in. A user can change between using OAuth and using a different method of authentication if they wish. Once a user is logged in, however, only the Use OAuth option is visible but it becomes disabled and the user cannot deselect it or see or change the Client ID or Secret.

Note, however, that if you want to overwrite an existing pre-configured Client with a new version to change the method of authentication, the Client ID and/or Client Secret, you must select Hide OAuth Settings, otherwise these change(s) won't take effect when you install the new Client.

 

 

In a standard Digitise Apps Client (i.e. the versions of the Windows Desktop and Android Digitise Apps Clients supplied in the Digitise Apps Product Download) all OAuth Settings are available and editable within the Digitise Apps Client's Settings. This is true whatever the method of Authentication selected or the value of the Hide OAuth Settings option. Users can change between using OAuth and the standard Digitise Apps authentication methods, providing they are not logged in. When logged in the OAuth settings are disabled. (Remember we don't supply a standard version of the Digitise Apps Client for iOS devices because you have to build your own using the pre-configured Client build feature to associate it with your Apple Distribution Certificate and Provisioning Profile.)


See also:

Log In Using Google OAuth Authentication

Add an OAuth User to App Manager